/*
** server.h for  in /home/jousse_f//workspace/SysUnix/ftp
** 
** Made by florian jousseau
** Login   <jousse_f@epitech.net>
** 
** Started on  Wed Apr  4 11:13:52 2012 florian jousseau
** Last update Wed Apr  4 15:13:11 2012 florian jousseau
*/

#ifndef SERVER_H_
# define SERVER_H_

# include	<sys/types.h>
# include	<sys/socket.h>
# include	<unistd.h>
# include	<stdlib.h>
# include	<stdio.h>
# include	<string.h>
# include	<netdb.h>
# include	<netinet/in.h>
# include	<arpa/inet.h>

typedef struct		s_cmd
{
  char			str[7];
  int			(*ptr)(char *buf, int cs);
}			t_cmd;

/* exec_cmd.c */
int			ls(char *buf, int cs);
int			cd(char *buf, int cs);
int			pwd(char *buf, int cs);
int			quit(char *buf, int cs);

/* file.c */
int			get(char *buf, int cs);
int			put(char *buf, int cs);

/* xfct_s.c */
int	xsocket(int domain, int type, int protocol);
int	xbind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
int	xlisten(int sockfd, int backlog);
int	xaccept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);

#endif /* !SERVER_H_ */
